﻿@using SCMS.Resource
@model SCMS.UI.Models.RejectWRO
@{AjaxOptions ajaxOpts = new AjaxOptions
  {
      UpdateTargetId = "popup-page",
      LoadingElementId = "popup-loading",
      HttpMethod = "Post",
      Url = Url.Action("RejectWRO"),
      OnSuccess = "ReviewComplete('" + string.Format(Resources.RequestReview_String_RejectMsg, Model.RefNumber) + "', '" + Resources.Global_String_WarehouseReleaseOrder + "')",
      Confirm = "Proceed with Rejection?"
  };}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    
@using (Ajax.BeginForm(null, null, ajaxOpts, new { @class = "form" }))
{
    @Html.ValidationSummary(true)    
    string backURL = "";
    <h4 style="text-align: center;">@Resources.Global_String_WarehouseReleaseOrder.ToUpper()</h4>
    <center><b>@Model.RefNumber</b></center>
    <table width="98%" align="center">
        <tr>
            <td colspan="2">@Resources.RequestReview_String_RejectionRemarks:</td>
        </tr>
        <tr>
            <td colspan="2">
            @{
                @Html.TextAreaFor(model => model.RejectedReviewRemarks)
                @Html.ValidationMessageFor(model => model.RejectedReviewRemarks)
                backURL = "/RequestReview/LoadWRO/" + Model.Id;
                @Html.HiddenFor(model => model.Id)    
            }            
            </td>
        </tr>
        <tr>
            <td width="50%"><a href="#" class="reviewLink" onclick="sendRequest('@backURL', 'popup-page', 'popup-loading'); CenterPopup();">@Resources.Global_String_Back</a></td>
            <td width="50%" align="right"><input type="submit" class="btn tertiary" value="@Resources.Global_String_Reject" /></td>
        </tr>
    </table>
}
